<template>
    <div id="app">
        <router-view></router-view>
        <div v-if="loading" class="global-loading">
            <cube-loading :size="60"></cube-loading>
        </div>
    </div>
</template>

<script>
import Dictionary from 'src/api/dictionary';
import Address from 'src/api/address';
export default {
    computed: {
        loading() {
            return this.$store.state.loading;
        }
    },
    created() {
        // 进入页面是加载字典
        // Dictionary.updateDictionary();
        // Address.update();

    }
};
</script>

<!--suppress CssInvalidPropertyValue -->
<style lang="scss">
    html {
        font-size: calc(100vw / 7.5);
    }
    #app {
        font-size: 14px;
        /*width: 100vw;*/
        /*height: 100vh;*/
        font-family: "Avenir", Helvetica, Arial, sans-serif;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
        background: #F0F0F0;
        line-height: normal;
    }
    /*使得所有svg都能自设颜色*/
    svg path{
        fill: inherit;
    }
    /*全局loading*/
    .global-loading {
        position: absolute;
        top: 0;
        left: 0;
        width:100vw;
        height: 100vh;
        background: rgba(30,30,30, 0.3);
        display: flex;
        justify-content: center;
        align-items: center;
        z-index: 9999;
    }


</style>
